'use strict';

module.exports.info = 'newFood';

let bc,contx;

let txIndex=Date.now();
module.exports.init = (blockchain,context,args) => {
    bc = blockchain;
    contx= context;
}

module.exports.run =  () => {
   txIndex++
   let args=[{
        'transaction_type' :'newFood(string,uint256,string,uint8)',
        'name':'name',
        'traceNumber':txIndex,
        'traceName':'123',
        'quality': 1
    }]
    return bc.invokeSmartContract(contx,'trace','v0',args,null);
}

module.exports.end = () => {
    return Promise.resolve();

}
